home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
005
/
product.arc
/
MACRO66.LSP
< prev
next >
Wrap
Text File
|
1986-09-23
|
979b
|
29 lines
(Defun C:SR ()
(Setvar "Cmdecho" 0)
(Setq B (If (null B) "" B))
(Setq C (If (null C) 1.0 C))
(Setq P1 (Getpoint "\nFirst point: "))
(Setq P2 (Getpoint "\nSecond point: "))
(Setq A1 (Angle P1 P2))
(Setq A (Getint "\nNumber of items: "))
(Prompt "\nBlock name <") (Prompt B)
(Setq BT (Getstring ">: "))
(Setq B (If (null BT) B BT))
(Prompt "\nScale factor <")
(Prompt (Rtos C (Getvar "Lunits") (Getvar "Luprec")))
(Setq CT (Getreal ">: "))
(Setq C (If (null CT) C CT))
(Setq D (Getstring "\nRotate item <N>: "))
(Setq D (If (= D "y") "Y" "N"))
(If (= D "Y")
(Setq D (* (/ 180 Pi) A1))
(Setq D 0)
)
(Setq E (Distance P1 P2)) (Setq E (/ E A))
(Setq P1 (Polar P1 A1 (* E 0.5)))
(Repeat A
(Command "Insert" B P1 C "" D)
(Setq P1 (Polar P1 A1 E))
)
)